package com.bm.specialvehiclefordispatcher.bean;

import java.io.Serializable;
import java.util.List;

import com.bm.specialvehiclefordispatcher.R;

public class Order implements Serializable {

	private static final long serialVersionUID = -2450270474645172859L;
	public long id;
	public String orderNum;
	/** 预约时间 **/
	public String appointmentTime;
	/** 计较条件 **/
	public String valuationCadition;
	/** 计价名称 **/
	public String valuationName;
	/** 订单撤销时间 **/
	public String revokeTime;
	/** 撤单赔偿总金额 **/
	public double sumDamage;
	/** 需求总方量 **/
	public double volume;
	/** 总价 **/
	public double sumPrice;
	/** 需求车辆数 **/
	public int count;
	/** 订单状态（0：抢单中 1：待开始(抢单人数满) 2：进行中(预约时间到) 3:已完成 4：撤销订单 5：删除订单） **/
	public int status;
	/** 车型 **/
	public String style1;
	/** 已抢单人数 **/
	public int robCount;
	/** 单价 **/
	public double unitPrice;
	/** 浮动单价 **/
	public int changeUnitPrice;
	/** 最终支付总金额 **/
	public double realSumPrice;
	/** 备注 **/
	public String remarks;
	public String condition;
	public String conditionName;
	public Station station;
	public long stationId;
	public String stationName;
	public long dispatcherId;
	public String disName;
	public String disPhone;
	public Dispatcher dispatcher;
	public long truckId;

	public List<OrderLog> orderLogs;

	public String getStatusString(int status) {
		String tmp = "";
		switch (status) {
		case 0:
			tmp = "抢单中";
			break;
		case 1:
			tmp = "待开始";
			break;
		case 2:
			tmp = "进行中";
			break;
		case 3:
			tmp = "已完成";
			break;
		case 4:
			tmp = "已撤销";
			break;
		case 6:
			tmp = "已超时";
			break;
		}
		return tmp;
	}
	
	public int getStatusResId(int status) {
		int tmp = 0;
		switch (status) {
		case 0:
			tmp = R.drawable.status1;
			break;
		case 1:
			tmp = R.drawable.status2;
			break;
		case 2:
			tmp = R.drawable.status3;
			break;
		case 3:
			tmp = R.drawable.status4;
			break;
		case 4:
			tmp = R.drawable.status2;
			break;
		}
		
		return tmp;
	}
	
	public int getStatusTextColor(int status) {
		int tmp = 0;
		switch (status) {
		case 0:
			tmp = 0xFF42bfd0;
			break;
		case 1:
			tmp = 0xFF9b9b9b;
			break;
		case 2:
			tmp = 0xFFc0a532;
			break;
		case 3:
			tmp = 0xFFfc7e6f;
			break;
		case 4:
			tmp = 0xFF9b9b9b;
			break;
		case 6:
			tmp = 0xFF9b9b9b;
			break;
		}
		tmp = 0xfffc8577;
		return tmp;
	}
}
